import Vue from 'vue'
import VueRouter from 'vue-router'

// 导入组件
// 首页
import Index from '../views/shouye.vue'
// 房产经纪
import agent from '../views/agent.vue'
// 地产分类
import category from '../views/category.vue'
// 地产详情
import propDetails from '../views/prop_details.vue'
// 地产列表
import property from '../views/property.vue'
// 关于我们
import regards from '../views/regards.vue'
// 404
import notFound from '../views/NotFound.vue'

Vue.use(VueRouter)

const routes = [

  // 首页
  {
    path: '/',
    component: Index,
  },
  // 房产经纪
  {
    path: '/agent',
    component: agent,
  },
  // 地产分类
  {
    path: '/category',
    component: category,
  },
  // // 地产列表
  {
    path: '/property/:id',
    component: property,
    // children:[]
  },
  // 地产详情
  {
    path: '/propDetails/:id',
    component: propDetails
  },
  // 关于我们
  {
    path: '/regards',
    component: regards
  },
  // 404
  {
    path: '*',
    component: notFound,
  },


]

const router = new VueRouter({
  routes
})

export default router
